﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ScoringForPainting.aspx.cs" Inherits="_Default" MasterPageFile="~/Teacher/Teacher.master" Title = "Scoring for painting"%>
<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxNewsControl" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent" >
    <asp:MultiView ID="munviwScoringForPainting" runat="server">
    <asp:View ID="viwScoringForPaingting" runat="server">
        <dx:ASPxGridView ID="gvScoringForPainting" runat="server" 
            AutoGenerateColumns="False" Caption="Scoring For Painting" 
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
            DataSourceID="SqlDataSource1" KeyFieldName="PostingID" Width="100%">
            <Columns>
                <dx:GridViewCommandColumn Caption="Scoring for painting" VisibleIndex="0">
                    <EditButton Text="Scoring for painting" Visible="True">
                    </EditButton>
                    <UpdateButton Text="Done">
                    </UpdateButton>
                    <ClearFilterButton Visible="True">
                    </ClearFilterButton>
                </dx:GridViewCommandColumn>
                <dx:GridViewDataTextColumn Caption="Student ID" FieldName="Expr1" 
                    ShowInCustomizationForm="True" VisibleIndex="1">
                    <EditFormSettings Visible="False" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="First name" FieldName="Firstname" 
                    ShowInCustomizationForm="True" VisibleIndex="2">
                    <EditFormSettings Visible="False" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Last name" FieldName="Lastname" 
                    ShowInCustomizationForm="True" VisibleIndex="3">
                    <EditFormSettings Visible="False" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataImageColumn FieldName="Painting" ReadOnly="True" 
                    ShowInCustomizationForm="True" Visible="False" VisibleIndex="4">
                    <PropertiesImage ImageAlign="Bottom" ImageHeight="100%" ImageWidth="100%">
                        <Style BackColor="Black">
                            <Border BorderColor="White" />
                        </Style>
                    </PropertiesImage>
                    <EditFormSettings CaptionLocation="None" ColumnSpan="2" RowSpan="1" 
                        Visible="True" />
                    <EditCellStyle BackColor="Black" HorizontalAlign="Center">
                        <Border BorderColor="White" />
                    </EditCellStyle>
                </dx:GridViewDataImageColumn>
                <dx:GridViewDataMemoColumn FieldName="Description" ReadOnly="True" 
                    ShowInCustomizationForm="True" Visible="False" VisibleIndex="5">
                    <PropertiesMemoEdit Height="100px" Width="500px">
                    </PropertiesMemoEdit>
                    <EditFormSettings ColumnSpan="2" RowSpan="1" Visible="True" />
                </dx:GridViewDataMemoColumn>
                <dx:GridViewDataTextColumn FieldName="Price" ReadOnly="True" 
                    ShowInCustomizationForm="True" Visible="False" VisibleIndex="6">
                    <EditFormSettings Visible="True" />
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataComboBoxColumn FieldName="Mark" ShowInCustomizationForm="True" 
                    VisibleIndex="7">
                    <PropertiesComboBox>
                        <Items>
                            <dx:ListEditItem Text="Best" Value="Best" />
                            <dx:ListEditItem Text="Better" Value="Better" />
                            <dx:ListEditItem Text="Good" Value="Good" />
                            <dx:ListEditItem Text="Moderate" Value="Moderate" />
                            <dx:ListEditItem Text="Normal" Value="Normal" />
                        </Items>
                    </PropertiesComboBox>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataMemoColumn FieldName="Remark" ShowInCustomizationForm="True" 
                    Visible="False" VisibleIndex="9">
                    <PropertiesMemoEdit Height="100px" Width="500px">
                    </PropertiesMemoEdit>
                    <EditFormSettings ColumnSpan="2" RowSpan="1" Visible="True" />
                </dx:GridViewDataMemoColumn>
            </Columns>
            <Settings ShowFilterRow="True" />
            <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>
        </dx:ASPxGridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Institte_of_Fine_ArtsConnectionString %>" 
            SelectCommand="SELECT Posting.PostingID, Posting.Painting, Posting.Description, Posting.Uploaded_Date, Posting.Price, Posting.StudentID, Posting.CompetitionID, Posting.Mark, Posting.Remark, Student.StudentID AS Expr1, Student.Firstname, Student.Lastname FROM Posting INNER JOIN Student ON Posting.StudentID = Student.StudentID WHERE (Posting.CompetitionID = @CompetitionID)" 
            UpdateCommand="UPDATE Posting SET Mark = @Mark, Remark = @Remark WHERE (PostingID = @PostingID)">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="0" Name="CompetitionID" SessionField="ID" 
                    Type="Int32" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="Mark" />
                <asp:Parameter Name="Remark" />
                <asp:Parameter Name="PostingID" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </asp:View>
    <asp:View ID="viwErrorScoring" runat="server">
        <dx:ASPxLabel ID="lbErrorScoring" runat="server" 
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
            ForeColor="Red" Text="ASPxLabel">
        </dx:ASPxLabel>
    </asp:View>
</asp:MultiView>
</asp:Content>
<asp:Content ID="Content1" runat="server" contentplaceholderid="HeadContent">
    <style type="text/css">
        .style3
        {
            height: 18px;
        }
    </style>
</asp:Content>
